use "C:\Country Change Indicators"
keep if year<2011
keep country govpay indpay mdate year
save "C:\z1", replace
keep country govpay mdate year
gen pay=govpay
drop govpay
gen type=country+"Gov"
sort country mdate
save "C:\z2", replace
use "C:\z1"
keep country indpay mdate year
gen pay=indpay
drop indpay
gen type=country+"Ind"
sort country mdate
save "C:\z3", replace
append using "C:\z2"
drop country
sort type mdate
format pay %8.2f
save "C:\Payment Table", replace
drop year
reshape wide pay,i(type) j(mdate)
outsheet using "C:\Qtrly Payment Table", replace

clear 

*** Table 3

use "C:\Payment Table"
collapse (sum) pay, by(type year)
reshape wide pay, i(type) j(year)
outsheet using "C:\Annual Payment Table", replace


